Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gpu support brineco2pvt #4319

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

multitalentloes
Copy link
Contributor

add necessary make_view and move_to_gpu functions to have brineCo2Pvt on the gpu

Copy link
Member

@atgeirr atgeirr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good and straightforward, should be merged when minor issues are addressed.

opm/material/fluidsystems/blackoilpvt/BrineCo2Pvt.hpp Outdated Show resolved Hide resolved
opm/material/fluidsystems/blackoilpvt/BrineCo2Pvt.hpp Outdated Show resolved Hide resolved
opm/material/fluidsystems/blackoilpvt/BrineCo2Pvt.hpp Outdated Show resolved Hide resolved
int activityModel = 3,
int thermalMixingModelSalt = 1,
int thermalMixingModelLiquid = 2,
Scalar T_ref = 288.71, //(273.15 + 15.56)
Scalar P_ref = 101325);

explicit BrineCo2Pvt(ContainerT brineReferenceDensity,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a 1-argument constructor, remove explicit.

(Unlike the one above which can be called with a single argument, although I do not like it. We should consider removing the defaults. In fact, some of those arguments are useless since we require the exact T_ref and P_ref above! It is also suspect to take integer arguments that are easily mixed, when we already have enum classes for two of them and should make one for activityModel.)

Should the ContainerT in this constructor argument list be const references?

opm/material/fluidsystems/blackoilpvt/BrineCo2Pvt.hpp Outdated Show resolved Hide resolved
namespace Opm::gpuistl {
template<class Scalar, class Params, class GPUContainer>
BrineCo2Pvt<Scalar, Params, GPUContainer>
move_to_gpu(BrineCo2Pvt<Scalar> cpuBrineCo2) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be const ref? Prefer brace on new line for functions and classes, also for make_view().

@multitalentloes multitalentloes force-pushed the gpu_support_brineco2pvt branch 2 times, most recently from 85541a2 to 68ebd79 Compare January 3, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants